{include file="public/head" /}
{include file="public/js_ueditor" /}
<!--有理想的地方，地狱都是天堂-->
<!--Copyright @ df81.com 版权所有-->
<!--作者: 南国老符 邮箱：1062129401@qq.com-->
        <!-- 左侧菜单 开始 -->
        <div class="sidebar">
            <nav>
                <ul class="nav nav-pills nav-sidebar flex-column nav-flat nav-legacy d-block d-md-none" data-widget="treeview" role="menu" data-accordion="false">
                    {include file="public/left_content" /}
                </ul>
                <ul class="nav nav-pills nav-sidebar flex-column nav-flat nav-legacy d-block d-md-none" data-widget="treeview" role="menu" data-accordion="false">
                    {include file="public/left_data" /}
                </ul>
                <ul class="nav nav-pills nav-sidebar flex-column nav-flat nav-legacy" data-widget="treeview" role="menu" data-accordion="false">
                    {include file="public/left_global" /}
                </ul>
                <ul class="nav nav-pills nav-sidebar flex-column nav-flat nav-legacy d-block d-md-none" data-widget="treeview" role="menu" data-accordion="false">
                    {include file="public/left_system" /}
                </ul>
            </nav>
        </div>
        <!-- 左侧菜单 结束 -->
    </aside>
    <!-- 左侧 结束 -->
    <!-- 右侧 开始 -->
    <div class="content-wrapper">
        <!-- 内容导航 开始 -->
        <div class="content-header py-2 bg-white mb-3">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-sm-12">
                        <ol class="breadcrumb">
                            <li>{:lang('v_global')}<i class="fas fa-angle-right mx-2"></i></li>
                            <li>{:lang('v_global')}<i class="fas fa-angle-right mx-2"></i></li>
                            <li>{:lang('v_friendlink')}<i class="fas fa-angle-right mx-2"></i></li>
                            <li>{empty name="rs.id"}{:lang('v_add')}{else /}{:lang('v_edit')}{/empty} {:lang('v_friendlink')}</li>
                        </ol>
                    </div>
                </div>
            </div>
        </div>
        <!-- 内容导航 结束 -->
        <!-- 内容主体 开始 -->
        <section class="content">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-md-12">
                        <div class="w-100 pt-3 pb-2 bg-white rounded mb-3">
                            <form name="form_keyword" action="{:url('/ad/index',['lang'=>$lang,'signid'=>1,'att_type'=>'link'])}" method="post" class="row">
                                <input type="hidden" name="lang" value="{$lang}">
                                <div class="col-md-8">
                                    <a class="btn btn-default mb-2 mr-2" href="{:url('/ad/index',['lang'=>$lang,'signid'=>1,'att_type'=>'link'])}"><i class="fa fa-fw fa-link mr-1"></i>{:lang('v_friendlink')}</a>
                                    <a class="btn btn-default mb-2 mr-2" href="{:url('/ad/index',['lang'=>$lang,'signid'=>9,'att_type'=>'link'])}"><i class="fa fa-fw fa-recycle mr-1"></i>{:lang('v_recycle')}</a>
                                    <a class="btn btn-success mb-2 mr-2" href="{:url('/ad/edit',['lang'=>$lang,'att_type'=>'link'])}"><i class="fa fa-fw fa-plus-circle mr-1"></i>{:lang('v_add')} {:lang('v_friendlink')}</a>
                                </div>
                                <div class="col-md-4">
                                    <div class="input-group">
                                        <input name="keyword" placeholder="{:lang('v_quickfind')}" type="text" class="form-control">
                                        <span class="input-group-append">
                                            <button type="submit" class="btn btn-success"><i class="fa fa-search mr-1"></i>{:lang('v_search')}</button>
                                        </span>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <div class="card card-outline card-success">
                            <div class="card-header"><i class="fas fa-fw fa-edit mr-1"></i>{empty name="rs.id"}{:lang('v_add')}{else /}{:lang('v_edit')}{/empty} {:lang('v_ad')}</div>
                            <div class="card-body">
                                <form name="form_edit" id="form_edit" method="post" action="">
                                    <input type="hidden" name="id" value="{$rs.id}">
                                    <input type="hidden" name="lang" value="{$lang}">
                                    <div class="row form-group">
                                        <div class="col-md-3 col-form-label text-right">{:lang('v_title')}</div>
                                        <div class="col-md-4">
                                            <input type="text" class="form-control" name="title" value="{$rs.title}" />
                                        </div>
                                    </div>
                                    <div class="row form-group">
                                        <div class="col-md-3 col-form-label text-right">{:lang('v_img')}</div>
                                        <div class="col-md-4">
                                            <div class="input-group">
                                                <input value="{$rs.thumb}" name="thumb" id="morepics1" type="text" class="form-control">
                                                <span class="input-group-append">
                                                    <button onclick="upImage('#morepics1');" type="button" class="btn btn-success"><i class="fas fa-cloud-upload-alt mr-1"></i>{:lang('v_upload_img')}</button>
                                                </span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row form-group">
                                        <div class="col-md-3 col-form-label text-right">{:lang('v_linkurl')}</div>
                                        <div class="col-md-4">
                                            <input type="text" class="form-control" name="linkurl" value="{$rs.linkurl}" />
                                        </div>
                                    </div>
                                    <div class="row form-group">
                                        <div class="col-md-3 text-right">{:lang('v_description')}</div>
                                        <div class="col-md-4">
                                            <textarea name="description" class="form-control" rows="5">{$rs.description}</textarea>
                                        </div>
                                    </div>
                                    <div class="row form-group">
                                        <div class="col-md-3 col-form-label text-right">{:lang('v_sequence')}</div>
                                        <div class="col-md-4">
                                            <input type="text" class="form-control" name="sequence" value="{empty name="rs.sequence"}0{else /}{$rs.sequence}{/empty}" />
                                        </div>
                                    </div>
                                    <div class="row form-group d-none">
                                        <div class="col-md-3 text-right">{:lang('v_attribute')}</div>
                                        <div class="col-md-9">
                                            <label class="form-check form-check-inline">
                                                <input type="radio" name="att_type" value="banner"{if $rs.att_type eq 'banner'} checked="checked"{/if} class="form-check-input" />{:lang('v_banner')}
                                            </label>
                                            <label class="form-check form-check-inline">
                                                <input type="radio" name="att_type" value="link"{if $rs.att_type eq 'link' or $rs.att_type eq ''} checked="checked"{/if} class="form-check-input" />{:lang('v_friendlink')}
                                            </label>
                                            {volist name="attribute" id="attributeRs"}
                                                <label class="form-check form-check-inline">
                                                    <input type="radio" name="att_type" value="{$attributeRs.title}"{eq name="rs.att_type" value="$attributeRs.title"} checked="checked"{/eq} class="form-check-input" />{$attributeRs.title}
                                                </label>
                                            {/volist}
                                        </div>
                                    </div>
                                    <div class="row form-group">
                                        <div class="col-md-3 text-right">{:lang('v_position')}</div>
                                        <div class="col-md-9">
                                            <label class="form-check form-check-inline">
                                                <input type="radio" name="position" value="index"{if $rs.position eq 'index' or $rs.position eq ''} checked="checked"{/if} class="form-check-input" />{:lang('v_index')}
                                            </label>
                                            {volist name="moduleList" id="moduleRs"}
                                                <label class="form-check form-check-inline">
                                                    <input type="radio" name="position" value="{$moduleRs.tabledir}"{eq name="rs.position" value="$moduleRs.tabledir"} checked="checked"{/eq} class="form-check-input" />{$moduleRs.title} {:lang('v_module')}
                                                </label>
                                            {/volist}
                                        </div>
                                    </div>
                                    <div class="row form-group">
                                        <div class="col-md-3 text-right">{:lang('v_client')}</div>
                                        <div class="col-md-9">
                                            <label class="form-check form-check-inline">
                                                {php}$client_array=explode(',',$rs['client']);{/php}
                                                <input type="checkbox" name="client[]" value="pc" {if in_array('pc',$client_array) or $rs['client'] eq ''}checked="checked"{/if} class="form-check-input">{:lang('v_client_pc')}
                                            </label>
                                            <label class="form-check form-check-inline">
                                                <input type="checkbox" name="client[]" value="wap" {if in_array('wap',$client_array) or $rs['client'] eq ''}checked="checked"{/if} class="form-check-input">{:lang('v_client_mobile')}
                                            </label>
                                            <label class="form-check form-check-inline {if config('app.isdisplay.uniapp') neq 1}d-none{/if}">
                                                <input type="checkbox" name="client[]" value="app" {if in_array('app',$client_array)}checked="checked"{/if} class="form-check-input">{:lang('v_client_uniapp')}
                                            </label>
                                        </div>
                                    </div>
                                    {include file="public/js_edit_area" /}
                                    <div class="row">
                                        <div class="offset-md-3 col-md-9 mb-4">
                                            <button type="button" class="do_ajax btn btn-success mr-4" onclick="javascript:do_ajax('#form_edit','.do_ajax','{:url('/ad/edit',['lang'=>$lang,'att_type'=>'link'])}','{:url('/ad/index',['lang'=>$lang,'signid'=>1,'att_type'=>'link'])}');"><i class="fas fa-check-circle mr-2"></i>{:lang('v_save')}</button>
                                            <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);"><i class="fa fa-angle-double-left mr-1"></i>{:lang('v_goback')}</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <!-- 内容主体 结束 -->
    </div>
    <!-- 右侧 结束 -->
{include file="public/foot" /}
<script type="text/plain" id="input_editor" style="display:none;"></script>
{include file="public/js_upload_img" /}
</body>
</html>